<?php
/*
 * @Author: Terry
 * @Date: 2025-03-20 17:46:51
 * @LastEditors: Terry
 * @LastEditTime: 2025-03-20 18:50:08
 * @Description: file content
 * @FilePath: \yyd_api\app\controller\user\v1\Contact.php
 */
declare (strict_types = 1);

namespace app\controller\user\v1;

use app\BaseController;
use think\facade\Db;

class Contact extends BaseController
{
    /**
     * 获取联系方式详情
     * @return \think\Response
     */
    public function getDetail()
    {
        $info = Db::table('contact')
            ->field('id,companyName,address,phone,email,wechat')
            ->where('status', 1)
            ->find();

        if (!$info) {
            return result(FAIL, '联系方式不存在');
        }

        return result(SUCCESS, '获取成功', $info);
    }
} 